#include <cstdio>
#include <cstring>
#include <cmath>
#include <iostream>
#include <algorithm>
using namespace std;
struct node 
{
	int x;
	int y;
	double d;
}p[60*60];
double x_[100];
double y_[100];
int fa[100];
bool cmp(node a,node b)
{
	return a.d<b.d;
}
int find(int x)
{
	if(fa[x]==x) return x;
	else return find(fa[x]);
}
int judge(int x, int y)
{
	x = find(x);
	y = find(y);
	if(x==y) return 0;
	else
	{
		fa[y] = x;
		return 1 ;
	}
}
inline void read(int &x)
{
	long long X=0;char ch=0;
	while(ch<'0'||ch>'9') ch = getchar();
	while(ch>='0'&&ch<='9') X =(X<<3)+(X<<1)+ch-'0',ch = getchar();
	x=X;
}
int main()
{
	int n;
	while(scanf("%d",&n)!=EOF&&n)
	{
		int a,b;
		for(int i = 1;i<=n;i++) fa[i] = i;
		read(a),read(b);
		if(a>b) 
		{
			int t = b;
			a = b;
			b = t;
		}
		for(int i = 1;i<=n;i++)
		{
			scanf("%lf %lf",&x_[i],&y_[i]);
		}
		int cnt = 0;
		for(int i = 1;i<=n;i++)
		{
			for(int j = i+1;j<=n;j++)
			{
				if(i!=a&&b!=j)
				{
					cnt++;
					p[cnt].x=i;
					p[cnt].y=j;
					double dir = (x_[i]-x_[j])*(x_[i]-x_[j])+(y_[i]-y_[j])*(y_[i]-y_[j]);
					p[cnt].d = sqrt(dir)+1e-6;
				}
			}
		}
		sort(p+1,p+1+cnt,cmp);
		double ans = 0;
		for(int i = 1;i<=cnt;i++)
		{	
			//printf("%d %d %f\n",p[i].x,p[i].y,p[i].d);
			if(judge(p[i].x,p[i].y))
			{
				ans += p[i].d;
			}
		}
		printf("%.2f\n",ans);
	}
	
}
